package com.niit.mobileDevide.numofapp;

import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class NumOfAppBean implements Writable {

    private int numAppsInstalled; // 已安装应用数量

    public NumOfAppBean() {}

    public NumOfAppBean(int numAppsInstalled) {
        this.numAppsInstalled = numAppsInstalled;
    }

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeInt(numAppsInstalled);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        numAppsInstalled = in.readInt();
    }

    public int getNumAppsInstalled() {
        return numAppsInstalled;
    }

    @Override
    public String toString() {
        return String.valueOf(numAppsInstalled);
    }
}